#include <vector>
#include <string>

struct Channel {
    int channel;
    float gain;
    float factor;
};

struct Remix {
    std::vector<Channel> sources;
    Channel target;
};

struct Delay {
    bool enabled = false;
    int duration = 0;
    std::vector<int> exceptChannels;
};

struct Group {
    std::string name = "default";
    std::vector<Remix> remixes;
};

struct Remixes {
    bool enabled = false;
    std::string group = "default";
    float threshold = 0.001f;
    std::vector<Group> groups;
};

struct CrossEffectConfig {
    float version;
    bool enabled = false;
    Delay delay;
    Remixes remixes;
};

bool parseXml(CrossEffectConfig* pConfig, const char* filename);
void logCrossEffectConfig(CrossEffectConfig* pConfig);
